package com.nidu.demo.oauth2.dto;

import com.nidu.demo.base.BaseTenantCO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.List;

@Data
@Schema(description = "OAuth2访问令牌对象")
@EqualsAndHashCode(callSuper = true)
public class OAuth2AccessTokenCO extends BaseTenantCO {
    /**
     * 主键ID
     */
    @Schema(description = "主键ID", example = "主键ID")
    private Long id;

    /**
     * 访问令牌
     */
    private String accessToken;

    /**
     * 刷新令牌
     */
    private String refreshToken;

    /**
     * 用户编号
     */
    private Long userId;

    /**
     * 客户端编号
     */
    private Long clientId;

    /**
     * 授权范围
     */
    private List<String> scopes;

    /**
     * 过期时间
     */
    private LocalDateTime expiresTime;

}